home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 10 / AACD 10.iso / AACD / System / MCC_SpeedBar / Developer / Autodocs / MCC_SpeedBar.doc
Text File  |  1999-10-13  |  9KB  |  422 lines

  1. TABLE OF CONTENTS
  2. 0001 SpeedBar.mcc/MUIA_SpeedBar_Borderless
  3. 0002 SpeedBar.mcc/MUIA_SpeedBar_Buttons
  4. 0003 SpeedBar.mcc/MUIA_SpeedBar_Images
  5. 0004 SpeedBar.mcc/MUIA_SpeedBar_RaisingFrame
  6. 0005 SpeedBar.mcc/MUIA_SpeedBar_SameHeight
  7. 0006 SpeedBar.mcc/MUIA_SpeedBar_SameWidth
  8. 0007 SpeedBar.mcc/MUIA_SpeedBar_SmallImages
  9. 0008 SpeedBar.mcc/MUIA_SpeedBar_SpacerIndex
  10. 0009 SpeedBar.mcc/MUIA_SpeedBar_Spread
  11. 0010 SpeedBar.mcc/MUIA_SpeedBar_StripUnderscore
  12. 0011 SpeedBar.mcc/MUIA_SpeedBar_Sunny
  13. 0012 SpeedBar.mcc/MUIA_SpeedBar_ViewMode
  14. 0013 SpeedBar.mcc/MUIM_SpeedBar_AddButton
  15. 0014 SpeedBar.mcc/MUIM_SpeedBar_AddButtonObject
  16. 0015 SpeedBar.mcc/MUIM_SpeedBar_AddSpacer
  17. 0016 SpeedBar.mcc/MUIM_SpeedBar_Clear
  18. 0017 SpeedBar.mcc/MUIM_SpeedBar_DoOnButton
  19. 0018 SpeedBar.mcc/MUIM_SpeedBar_GetObject
  20. 0019 SpeedBar.mcc/SpeedBar.mcc
  21. SpeedBar.mcc/MUIA_SpeedBar_Borderless
  22.  
  23. NAME
  24.        MUIA_SpeedBar_Borderless  --  BOOL                  [IS.]
  25.  
  26.  
  27. FUNCTION
  28.        Remove the frames from the gadgets
  29.  
  30.  
  31. SEE ALSO
  32.  
  33.  
  34. SpeedBar.mcc/MUIA_SpeedBar_Buttons
  35.  
  36. NAME
  37.        MUIA_SpeedBar_Buttons   --  struct MUIS_SpeedBar_Button *   [I..]
  38.  
  39.  
  40. FUNCTION
  41.        Specify an array of buttons that should be placed in the bar.
  42.  
  43.        The structure you need to fill consists of these fields:
  44.  
  45.        struct MUIS_SpeedBar_Button {
  46.                ULONG           Img;
  47.                STRPTR          Text;
  48.                STRPTR          Help;
  49.                UWORD           Flags;
  50.                struct IClass  *Class;
  51.                Object         *Object;
  52.        };
  53.  
  54.        Img     is the index of the MyBrush image used by the button.
  55.        Text    is the button label.
  56.        Help    is the button short-help (for bubble help)
  57.  
  58.        Flags   can be used to set the type of button you need (see
  59.                SpeedBar_mcc.h)
  60.  
  61.        Class   if you want to subclass SpeedButton.mcc to add drag'n'drop
  62.                or something place the pointer to your new class here:
  63.                these way SpeedBar will know how to recreate your buttons
  64.                correctly.
  65.                Otherwise leave it to NULL.
  66.  
  67.        Object  this will be filled after the creation of the bar with
  68.                a pointer to the button. Remember not to cache it and
  69.                have a look at Demo.c to see how to reference other
  70.                SpeedBar members correctly.
  71.  
  72.  
  73.  
  74. NOTES
  75.  
  76.  
  77. SEE ALSO
  78.        MUIA_SpeedBar_Images
  79.  
  80.  
  81. SpeedBar.mcc/MUIA_SpeedBar_Images
  82.  
  83. NAME
  84.        MUIA_SpeedBar_Images  --  struct MyBrush **         [I.G]
  85.  
  86.  
  87. FUNCTION
  88.        Specify the images which will be used by the buttons of the bar
  89.  
  90.  
  91. SEE ALSO
  92.  
  93.  
  94. SpeedBar.mcc/MUIA_SpeedBar_RaisingFrame
  95.  
  96. NAME
  97.        MUIA_SpeedBar_RaisingFrame  --  BOOL                [IS.]
  98.  
  99.  
  100. FUNCTION
  101.        Setting this and _Borderless to TRUE will give you a toolbar whose
  102.        buttons will draw a frame around them when you move the pointer
  103.        over them.
  104.  
  105.  
  106. SEE ALSO
  107.        MUIA_SpeedBar_Borderless
  108.  
  109.  
  110. SpeedBar.mcc/MUIA_SpeedBar_SameHeight
  111.  
  112. NAME
  113.        MUIA_SpeedBar_SameHeight  --  BOOL                   [I..]
  114.  
  115.  
  116. FUNCTION
  117.        Set it to FALSE if you don't want all the buttons to have
  118.        the same height. This is only useful if you have a vertical
  119.        toolbar.
  120.  
  121.  
  122. SEE ALSO
  123.        MUIA_SpeedBar_SameWidth
  124.  
  125.  
  126. SpeedBar.mcc/MUIA_SpeedBar_SameWidth
  127.  
  128. NAME
  129.        MUIA_SpeedBar_SameWidth  --  BOOL                   [I..]
  130.  
  131.  
  132. FUNCTION
  133.        Set it to FALSE if you don't want all the buttons to have
  134.        the same width. This is only useful if you have an horizontal
  135.        toolbar.
  136.  
  137.  
  138. SEE ALSO
  139.        MUIA_SpeedBar_SameHeight
  140.  
  141.  
  142. SpeedBar.mcc/MUIA_SpeedBar_SmallImages
  143.  
  144. NAME
  145.        MUIA_SpeedBar_SmallImages  --  BOOL                 [IS.]
  146.  
  147.  
  148. FUNCTION
  149.        If set to TRUE the images will be reduced to 2/3 of their original
  150.        size.
  151.  
  152.  
  153. SEE ALSO
  154.  
  155.  
  156. SpeedBar.mcc/MUIA_SpeedBar_SpacerIndex
  157.  
  158. NAME
  159.        MUIA_SpeedBar_SpacerIndex  --  UWORD                [I.G]
  160.  
  161.  
  162. FUNCTION
  163.        If you want an empty spacer object, set this to -1, otherwise
  164.        set it to the index of the images inside the _Images array.
  165.  
  166.  
  167. SEE ALSO
  168.        MUIA_SpeedBar_Images
  169.  
  170.  
  171. SpeedBar.mcc/MUIA_SpeedBar_Spread
  172.  
  173. NAME
  174.        MUIA_SpeedBar_Spread  --  BOOL                      [I..]
  175.  
  176.  
  177. FUNCTION
  178.        Setting this to TRUE will cause the bar to layout the objects
  179.        evenly, stretching spacer objects. Otherwise the bar will be
  180.        left aligned.
  181.  
  182.  
  183. SEE ALSO
  184.  
  185.  
  186. SpeedBar.mcc/MUIA_SpeedBar_StripUnderscore
  187.  
  188. NAME
  189.        MUIA_SpeedBar_StripUnderscore  --  BOOL             [I..]
  190.  
  191.  
  192. FUNCTION
  193.        Causes the bar to strip underscores from buttons labels.
  194.        I don't think you'd need this, but I do :)
  195.  
  196.  
  197. SEE ALSO
  198.  
  199.  
  200. SpeedBar.mcc/MUIA_SpeedBar_Sunny
  201.  
  202. NAME
  203.        MUIA_SpeedBar_Sunny  --  BOOL                       [IS.]
  204.  
  205.  
  206. FUNCTION
  207.        Do you need buttons a là IE5 (coloured when the mouse is over
  208.        them and grey otherwise)? Set this to TRUE then :)
  209.  
  210.  
  211. SEE ALSO
  212.  
  213.  
  214. SpeedBar.mcc/MUIA_SpeedBar_ViewMode
  215.  
  216. NAME
  217.        MUIA_SpeedBar_ViewMode  --  UWORD                   [ISG]
  218.  
  219.  
  220. FUNCTION
  221.        Set the style of the toolbar. See SpeedBar_mcc.h for the available
  222.        options.
  223.  
  224.  
  225. SEE ALSO
  226.        SpeedBar_mcc.h
  227.  
  228.  
  229. SpeedBar.mcc/MUIM_SpeedBar_AddButton
  230.  
  231. NAME
  232.        MUIM_SpeedBar_AddButton
  233.  
  234.  
  235. SYNOPSIS
  236.        DoMethod( obj, MUIM_SpeedBar_AddButton, speedbar_button );
  237.  
  238.  
  239. FUNCTION
  240.        Adds a button to the bar.
  241.  
  242.  
  243. INPUTS
  244.        speedbar_button     pointer to a MUIS_SpeedBar_Button structure
  245.  
  246.  
  247. RESULT
  248.        Object * to the created button.
  249.  
  250.  
  251. SEE ALSO
  252.  
  253.  
  254. SpeedBar.mcc/MUIM_SpeedBar_AddButtonObject
  255.  
  256. NAME
  257.        MUIM_SpeedBar_AddButtonObject
  258.  
  259.  
  260. SYNOPSIS
  261.        DoMethod( obj, MUIM_SpeedBar_AddButtonObject, button );
  262.  
  263.  
  264. FUNCTION
  265.        Adds an object to the bar.
  266.  
  267.  
  268. INPUTS
  269.        Object *button  - object you want to add
  270.  
  271.  
  272. RESULT
  273.        none you should care about
  274.  
  275.  
  276. SEE ALSO
  277.  
  278.  
  279. SpeedBar.mcc/MUIM_SpeedBar_AddSpacer
  280.  
  281. NAME
  282.        MUIM_SpeedBar_AddSpacer
  283.  
  284.  
  285. SYNOPSIS
  286.        DoMethod( obj, MUIM_SpeedBar_AddSpacer );
  287.  
  288.  
  289. FUNCTION
  290.        Adds a spacer object
  291.  
  292.  
  293. RESULT
  294.        Object * to the spacer created.
  295.  
  296.  
  297. SEE ALSO
  298.  
  299.  
  300. SpeedBar.mcc/MUIM_SpeedBar_Clear
  301.  
  302. NAME
  303.        MUIM_SpeedBar_Clear
  304.  
  305.  
  306. SYNOPSIS
  307.        DoMethod( obj, MUIM_SpeedBar_Clear );
  308.  
  309.  
  310. FUNCTION
  311.        Clears the toolbar.
  312.  
  313.  
  314. SEE ALSO
  315.  
  316.  
  317. SpeedBar.mcc/MUIM_SpeedBar_DoOnButton
  318.  
  319. NAME
  320.        MUIM_SpeedBar_DoOnButton
  321.  
  322.  
  323. SYNOPSIS
  324.        DoMethod( obj, MUIM_SpeedBar_DoOnButton, i, method, ... );
  325.  
  326.  
  327. FUNCTION
  328.        Performs the specified method on the i-th object of the bar.
  329.  
  330.  
  331. INPUTS
  332.        ULONG   i       index of the object to send the method to
  333.        ULONG   method  method to invoke
  334.  
  335.  
  336. EXAMPLE
  337.  
  338.        DoMethod( buttons[ 0 ].Object, MUIM_Notify, MUIA_Selected, FALSE,
  339.                  SpeedBar, 5,
  340.                  MUIM_SpeedBar_DoOnButton, 1, MUIM_Set, MUIA_Selected, FALSE );
  341.  
  342.  
  343.  
  344. NOTES
  345.        This methods MUST be used if you change the toolbar style
  346.        without destroying and recreating the bar!
  347.  
  348.  
  349. SEE ALSO
  350.  
  351.  
  352. SpeedBar.mcc/MUIM_SpeedBar_GetObject
  353.  
  354. NAME
  355.        MUIM_SpeedBar_GetObject
  356.  
  357.  
  358. SYNOPSIS
  359.        Object *obj = (Object *)DoMethod( bar, MUIM_SpeedBar_GetObject, i );
  360.  
  361.  
  362. FUNCTION
  363.        Returns a pointer to the object number i in the bar.
  364.  
  365.  
  366. INPUTS
  367.        ULONG   i       index of the object you need
  368.  
  369.  
  370. RESULT
  371.        Object *obj     the object you need
  372.  
  373.  
  374. NOTES
  375.  
  376.  
  377. SEE ALSO
  378.  
  379.  
  380. SpeedBar.mcc/SpeedBar.mcc
  381.  
  382. NOTES
  383.  
  384.    SpeedBar.mcc, SpeedButton.mcc ©1999 by Simone Tellini
  385.    All Rights Reserved.
  386.  
  387.  
  388.  
  389.    SpeedBar.mcc and SpeedButton.mcc allow you to easily create toolbars
  390.    similar to those you can see in Windows programs (although you can
  391.    get a standard look as well ;)
  392.  
  393.    SpeedBar.mcc is just a MUIC_Group subclass which should contain only
  394.    a set of SpeedButton objects: if you need it to contain other kinds of
  395.    objects, well, try it... it might work.
  396.  
  397.    These classes can be freely used: all I ask is to receive a registered
  398.    copy of your program if it uses them.
  399.  
  400.  
  401.    IMPORTANT NOTE: if you plan to offer the user the chance to change
  402.                    the toolbar style on the fly you should *NEVER* cache
  403.                    the pointer to single buttons: this means that something
  404.                    like this should never be seen in your code:
  405.  
  406.                    set( button, MUIA_Disabled, TRUE ); // just an example
  407.  
  408.                    where button is an Object * to a SpeedBar member.
  409.  
  410.                    The reason behind this is that some of the style changes
  411.                    may cause the bar to destroy and recreate all the buttons
  412.                    thus invalidatin all the previous pointers.
  413.  
  414.                    But don't worry: you have MUIM_SpeedBar_GetObject and
  415.                    MUIM_SpeedBar_DoOnButton to solve the problem.
  416.  
  417.  
  418.    P.S. Remember that programmers don't write docs... so bear with me
  419.         if some points may result unclear or badly written :)
  420.  
  421.  
  422.